With the rise of computer automation, data processing, manipulation and its use have become fundamental aspects of a multitude of everyday activities. Often, it is advantageous to replicate or transfer larges stores of data, so that, for example, the data can be found in more than one network location. Replication may ensure that a corruption event suffered at one location does not cause information loss, because the data can be recopied from an uncorrupted location. Similarly, data transfer may facilitate data reporting from a new location and, consequently, to more than one group or cluster of computer users.
The integrity of data generated via replication or transfer, however, is often compromised by the loss of data dependency information, particularly, though not exclusively, when the database being copied or transferred conforms to the relational data model. As is well known in the art, the tables, columns and views that may characterize a relational database are often interdependent, and these data dependencies are required to accurately extract the information contained in a database. Therefore, when transferring object schemas such as tables, views, functions, and stored procedures from one database to another, it is necessary to ensure that that the objects are transferred in an order that does not violate their interdependencies. For example, if a view “V1” is dependent upon a view “V2,” which in turn is dependent upon a table “T1,” it is necessary to transfer the objects in the following order: T1, V2, V1. Otherwise, an object, dependent upon another, will be transferred without information that is necessary to define the object, leading to errors. Furthermore, even if database objects are transferred in the correct order, dependency information will often be lost during data transfer as a result of the deletion and recreation of database objects that other database objects are dependent upon. In the above example, even if “T1” is correctly transferred before “V2,” the deletion and recreation of “T1” attendant to the replication/transfer process may impair in formation that reflects the dependent relationship between “V2” and “T1.”
Thus, there is a need for a method and apparatus for preserving data dependencies during data replication/transfer that both ensures data is transferred in the correct order and addresses the problem of deletion and recreation of database objects that other database objects are dependent upon.